package ControlLayer;

import DBLayer.*;
import ModelLayer.*;

public class UpdateControler implements IFUpdate {

	private DbContact ContactDB;
	private DbEmployee EmployeeDB;
	private DbProduct ProductDB;
	private DbSalesOrder salesOrderDB;
	private DbDelivery DeliveryDB;
	
	public UpdateControler()
	{
		ContactDB = new DbContact();
		EmployeeDB = new DbEmployee();
		ProductDB = new DbProduct();
		salesOrderDB = new DbSalesOrder(); 
		DeliveryDB = new DbDelivery();
	}
	@Override
	public int updateCustomer(Contact customer) {
		return ContactDB.updateCustomer(customer);
	}

	@Override
	public int updateDelivery(Delivery delivery) {
		return DeliveryDB.updateDelivery(delivery);
	}

	@Override
	public int updateEmployee(Employee employee) {
		return EmployeeDB.updateEmployee(employee);
	}

	@Override
	public int updateProduct(Product product) {
		return ProductDB.updateProduct(product);
	}

	@Override
	public int updateOrder(SalesOrder salesOrder) {
		return salesOrderDB.updateSalesOrder(salesOrder);
	}
}
